org.jboss.byteman.synchronization
Class Rendezvous

java.lang.Object
  extended by org.jboss.byteman.synchronization.Rendezvous

public class Rendezvous
extends java.lang.Object

class used to manage rule rendezvous operations


Nested Class Summary
 class Rendezvous.Counter
          class encapsulating state for a specific rendezvous
 
Constructor Summary
Rendezvous(int expected)
           
Rendezvous(int expected, boolean rejoinable)
           
 
Method Summary
 boolean delete()
          delete this rendezvous causing any waiting threads to return -1 form the rendezvous call.
 int getArrived()
          retrieve the number of threads waiting at the rendezvous or -1 if the rendezvous has been deleted
 int getExpected()
           
 boolean needsRemove()
          check if the rendezvous has completed but has not yet been rtemoved
 int rendezvous()
          enter this rendezvous.
 void setRemoved()
          mark a completed rendezvous to indicate that it has been removed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rendezvous

public Rendezvous(int expected)

Rendezvous

public Rendezvous(int expected,
                  boolean rejoinable)
Method Detail

rendezvous

public int rendezvous()
enter this rendezvous. n.b. this must be called synchronized on the rendezvous object in question

Returns:
the index in arrival order from 0 to expected of the calling thread or -1 if either the rendezvous has completed and is not restartable or the rendezvous has been deleted

delete

public boolean delete()
delete this rendezvous causing any waiting threads to return -1 form the rendezvous call. n.b. this must be called synchronized on the rendezvous object in question

Returns:

getExpected

public int getExpected()

getArrived

public int getArrived()
retrieve the number of threads waiting at the rendezvous or -1 if the rendezvous has been deleted

Returns:

needsRemove

public boolean needsRemove()
check if the rendezvous has completed but has not yet been rtemoved

Returns:

setRemoved

public void setRemoved()
mark a completed rendezvous to indicate that it has been removed



Copyright © 2012. All Rights Reserved.